From b8eaf5968587c815f63cc21a1baf075f485cde20 Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Fri, 28 Dec 2018 10:14:33 -0700 Subject: [PATCH] add include guard for src/core/optional.h (#290) --- csv_util.cc | 1 + src/core/optional.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/csv_util.cc b/csv_util.cc index 84fd98bfa..af959182d 100644 --- a/csv_util.cc +++ b/csv_util.cc @@ -32,6 +32,7 @@ #include "grtcirc.h" #include "jeeps/gpsmath.h" #include "src/core/logging.h" +#include "src/core/optional.h" #include "strptime.h" #include diff --git a/src/core/optional.h b/src/core/optional.h index 0357fb756..72f896b4b 100644 --- a/src/core/optional.h +++ b/src/core/optional.h @@ -23,6 +23,9 @@ // 1. 'gpsbabel_optional::optional' to 'std::optional', // 2. 'include "optional.h"' becomes 'include '. +#ifndef GPSBABEL_OPTIONAL_H_INCLUDED_ +#define GPSBABEL_OPTIONAL_H_INCLUDED_ + #if __cplusplus >= 201703L #warning "using std::optional" #include @@ -250,3 +253,4 @@ constexpr bool operator>=(const T& value, const optional& opt) } // namespace #endif +#endif // GPSBABEL_OPTIONAL_H_INCLUDED_ -- 2.30.2